SELECT t.c1_wf_task_CODE, t.NAME FROM c1_wf_task t
where t.state_code ='1' and t.data_state_code = '1'
<#if cardone.StringUtils.isBlank(notTerm) >
    <#if cardone.StringUtils.isNotBlank(term)>
    and (INSTR(t.NAME, :term) > 0 OR INSTR(t.c1_wf_task_CODE, :term) > 0)
    </#if>
</#if>
AND ROWNUM <= 20
ORDER BY T.ORDER_BY_, T.c1_wf_task_CODE